import Vue from 'vue';
import App from './App';
import ClUni from "cl-uni";
import store from '@/store/index.js';
import uView from "@/uni_modules/uview-ui";
Vue.use(uView);

Vue.use(ClUni, {
	// 进入业务单页时，页面栈只有一个，自定义导航左侧返回按钮跳转的路径
	homePage: "/"
});

import mixin from './utils/mixin.js'
Vue.mixin(mixin)

import {router,RouterMount} from './api/router.js'  //路径换成自己的
Vue.use(router)

uni.$u.http.setConfig((config) => {
	/* config 为默认全局配置*/
	config.baseURL = `https://4de16698-d9f4-443a-b416-ef1037cce952.bspapp.com/http`; /* 根域名 */
	config.header.token = uni.getStorageSync('token');
	// if(config.url.startsWith('/order')){
	config.header.platform = 'app-plus';
	// }
	return config
})

App.mpType = 'app';
Vue.config.productionTip = false;
const app = new Vue({
	...App,
	store
});

app.$mount();